package com.example.demo.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.example.demo.service.MonitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description：监控视频
 * @author: qinling
 * @Date: 2021-02-22 15:27
 */
@RestController
@RequestMapping("/monitor")

public class MonitorController {


    @Value("${hk.host}")
    private String host;

    @Value("${hk.appKey}")
    private String appKey;

    @Value("${hk.appSecret}")
    private String appSecret;

    @Value("${hk.uri}")
    private String uri;

    @Value("${hk.http}")
    private String http;

    @Resource
    private MonitorService monitorService;

    @GetMapping("/previewURL")
    public R GetCameraPreviewURL(@RequestParam String cameraCode) {
        return R.ok("OK!!!");
    }

    @GetMapping("/list")
    public R list() {
        return R.ok(monitorService.getList());
    }

}
